gh-143732: allow dict subclasses to be specialized #148128
gh-143732: allow dict subclasses to be specialized #148128markshannon merged 23 commits intopython:mainfrom
Conversation
|
@markshannon Can you take a look at this? I'd like get this in time for the beta release. |
markshannon
left a comment
There was a problem hiding this comment.
Looks good overall.
The old uops need to be removed and some assertions may no longer be valid.
Also, take care with recorded types. Only strengthen type information on proven or guards, not recorded information.
|
GitHub doen't put comments in order, it seems. The "above" in the comments refers to earlier lines, not earlier comments. |
I removed the assertions now and added watchers for all cases. I have made the requested changes; please review again |
|
Thanks for making the requested changes! @markshannon: please review the changes made to this pull request. |
Documentation build overview
12 files changed ·
|
markshannon
left a comment
There was a problem hiding this comment.
I still think we need more watchers. Sorry, I should have spotted that in the last review.
|
When you're done making the requested changes, leave the comment: And if you don't make the requested changes, you will be poked with soft cushions! |
|
Looks like the CI is affected by the Ubuntu outage today. |
|
I have made the requested changes; please review again |
|
Thanks for making the requested changes! @markshannon: please review the changes made to this pull request. |
markshannon
left a comment
There was a problem hiding this comment.
This looks good now. Thanks.
|
This is revival of #132383 which allowed specialization for dict subclasses which do not override
__getitem__. This PR also allows specialization for dict subclasses which do not override__setitem__.This is primarily targeted for
defaultdictwhich is the most performance critical subclass of dict.